#!/usr/bin/env python 
# -*- coding:utf-8 -*-
#- 需求：爬取搜狗首页的页面数据
import requests
if __name__ == "__main__":
    #step_1:指定url
    url = 'https://www.sogou.com/'
    #step_2:发起请求
    #get方法会返回一个响应对象
    response = requests.get(url=url)
    #step_3:获取响应数据.text返回的是字符串形式的响应数据
    page_text = response.text
    print(page_text)
    #step_4:持久化存储
    with open('./sogou.html','w',encoding='utf-8') as fp:
        fp.write(page_text)
    print('爬取数据结束！！！')
https://api.map.baidu.com/?qt=s&c=140&wd=%E5%8D%81%E5%AD%97%E9%97%A8%E5%8D%8E%E5%8F%91%E5%95%86%E9%83%BD&rn=10&ie=utf-8&oue=1&fromproduct=jsapi&v=2.1&res=api&callback=BMap._rd._cbk16739&ak=E4805d16520de693a3fe707cdc962045&seckey=undefined
https://api.map.baidu.com/?qt=s&c=131&wd=%E4%B8%96%E8%8C%82%E6%B8%AF%E7%8F%A0%E6%BE%B3%E5%90%88%E4%BD%9C%E5%88%9B%E6%96%B0%E5%9F%BA%E5%9C%B0&rn=10&ie=utf-8&oue=1&fromproduct=jsapi&v=2.1&res=api&callback=BMap._rd._cbk31070&ak=E4805d16520de693a3fe707cdc962045&seckey=undefined